package cn.jy.feeback.service.impl;


import cn.jy.common.feeback.ExpressFeeback;
import cn.jy.common.feeback.ExpressFeebackVo;
import cn.jy.feeback.mapper.ExpressFeebackMapper;
import cn.jy.feeback.service.ExpressFeebackService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ExpressFeebackServiceImpl implements ExpressFeebackService {

    @Autowired
    private ExpressFeebackMapper expressFeebackMapper;

    @Override
    public PageInfo<ExpressFeebackVo> selectExpressFeebackList(ExpressFeebackVo expressFeebackVo) {
        PageHelper.startPage(expressFeebackVo.getPageNum(),expressFeebackVo.getPageSize());
        List<ExpressFeebackVo> expressFeebackVos = expressFeebackMapper.selectExpressFeebackList(expressFeebackVo);
        PageInfo<ExpressFeebackVo> expressFeebackVoPageInfo = new PageInfo<>(expressFeebackVos);
        return expressFeebackVoPageInfo;
    }

    @Override
    public ExpressFeeback findId(Integer id) {
        return expressFeebackMapper.findId(id);
    }

    @Override
    public int updateExpressFeeback(ExpressFeeback expressFeeback) {
        return expressFeebackMapper.updateExpressFeeback(expressFeeback);
    }
}
